# coding: utf-8
import os
import sys
from pathlib import Path

# change DEBUG to False if you want to compile the code to exe
DEBUG = "__compiled__" not in globals()


YEAR = 2025
AUTHOR = "ZTough"
VERSION = "1.0.2"
APP_NAME = "ZToughAI"

# Use platform-specific AppData locations
if sys.platform == 'win32':
    # Windows: AppData/Roaming/ZToughAI
    CONFIG_FOLDER = Path(os.environ.get('APPDATA')) / APP_NAME
elif sys.platform == 'darwin':
    # macOS: ~/Library/Application Support/ZToughAI
    CONFIG_FOLDER = Path.home() / "Library" / "Application Support" / APP_NAME
else:
    # Linux and others: ~/.config/ZToughAI
    CONFIG_FOLDER = Path.home() / ".config" / APP_NAME

# Create config directory if it doesn't exist
CONFIG_FOLDER.mkdir(parents=True, exist_ok=True)

CONFIG_FILE = CONFIG_FOLDER / "config.json"
URL = "https://ztough.cn/"
BASE_URL = "https://ai.ztough.cn/v1/"
LLM_URL = "https://ai.ztough.cn/"
API_URL = "https://api.ztough.cn/"
HELP_URL = "https://www.yuque.com/zhangyewuxianxiaozhang/lvi7zn"
QQ = "https://qm.qq.com/q/UG1LBtB0ci/"